package com.qy127.dao.impl;

import com.qy127.dao.TypeDao;
import com.qy127.util.JDBCUtil;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository("typeDaoImpl")
public class TypeDaoImpl implements TypeDao {

    @Override
    public List<Map<String, Object>> getAllType() {

        String sql="select typeid,typename from t_type";
        List<Map<String, Object>> maps = JDBCUtil.queryListMap(sql);
        if (maps.size()>0){
            return maps;
        }
        return null;
    }
}
